<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php $this->headTitle();?>
<?php $this->headScript()->prependFile($this->baseUrl().'/js/backend/jquery-1.3.2.min.js'); ?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/xpmenuv21.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/cookie.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/ui.core.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/ui.datepicker.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/common.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/jquery-ui-1.7.2.custom.min.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/dialog.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/jquery.validate.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/multifile_compressed.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/multifile.js')?>
<?php $this->headScript()->appendFile($this->baseUrl().'/js/backend/popup.js')?>
<?php  echo $this->headScript();?>
<?php $this->headLink()->prependStylesheet($this->baseUrl().'/css/backend/admin.css');?>
<?php $this->headLink()->prependStylesheet($this->baseUrl().'/css/backend/jquery.tabs.css');?>
<?php $this->headLink()->prependStylesheet($this->baseUrl().'/css/backend/sddm.css');?>
<?php $this->headLink()->prependStylesheet($this->baseUrl().'/css/general.css');?>
<?php $this->headLink()->appendStylesheet($this->baseUrl().'/js/theme/smoothness/jquery-ui-1.7.2.custom.css');?>
<?php  echo $this->headLink();?>

<script language="javascript">
<!--
function showHideMenu(iconObject,mnuObj){
	var	menu=document.getElementById(mnuObj);
	if(menu.style.display!='none'){
		menu.style.display='none';
		Set_Cookie('showLeftCol','false',30,'/','','');
		document['HideHandle'].src =  '<?php echo $this->baseUrl()?>/images/admin/show.gif';	
	}else{
		menu.style.display='block';
		Set_Cookie('showLeftCol','true',30,'/','','');
		document['HideHandle'].src = '<?php echo $this->baseUrl()?>/images/admin/hide.gif';	
	}
}
$(document).ready(function(){
	$("#ajaxloading").ajaxStart(function(){			
		var winH = $(window).height(); 
		var winW = $(window).width(); 
		var centerDiv = $("div",this);
		centerDiv.css('top', winH/2-centerDiv.height()/2); 
		//centerDiv.css('left', winW/2-centerDiv.width()/2); 				
		$(this).fadeIn();
	 });
	 $("#ajaxloading").ajaxStop(function(){
		 $(this).fadeOut();
	 });			 
});
//-->
</script>
</head>
<body>
<div id='ajaxloading' class="loadinglayer" style="display:none">
	<img src='<?php echo $this->baseUrl()?>/images/ajax-loader.gif' align="middle" alt=""/> 
	<?php echo $this->translate('Loading...'); ?>
</div>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="wrapper">
<tr>
	<td height="20" class="rowTop">
		<img src="<?php echo $this->baseUrl();?>/images/admin/trans.gif" width="20" height="5" />
		<a href="#"><strong><?php echo $this->translate('Home'); ?></strong></a>
		<img src="<?php echo $this->baseUrl()?>/images/admin/trans.gif" width="15" height="5" />
		<a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'auth', 'action' => 'logout'), 'default', true)?>">
			<strong><?php echo $this->translate('Logout')?></strong>
		</a>
	</td>
</tr>
<tr>
	<td height="30" class="textGrey"><!--<img src="images/logo.gif">--> 
	<h1><?php echo $this->translate('Administrator control panel')?></h1></td>
</tr>
<tr>
	<td height="20" class="rowTop">
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
		<tr >
			<td width="25%" align="left">
			<?php echo $this->translate('Welcome');?>  
			<span><b> :
			<?php
				$fullName = ucwords($this->userProfile['first_name']) . " "
							. ucwords($this->userProfile['last_name']);
				$infoUser = $fullName . " (" . $this->userProfile['username'] .")";							
				echo $infoUser;
			?> 
			</b>
			</span>
			</td>
			<td width="25%" align="right">
				<b>
				(<a href="#">
					<?php echo $this->translate("Detail User's information ");?>
				</a>)
				</b>
				<img src="<?php echo $this->baseUrl();?>/images/admin/trans.gif" width="7" height="5" /> 
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td valign="top">
		<table width="100%" border="0" cellspacing="1" cellpadding="0" id="height100">
		  <tr valign="top">
			<td valign="top" width="5">
				<img src="<?php echo $this->baseUrl()?>/images/admin/hide.gif" onclick="showHideMenu(this,'leftMenu');" id="HideHandle" name="HideHandle" />
			</td>
			<td valign="top" bgcolor="#B9BCCD">
				<!--  start left menu -->
				<div id="leftMenu" style="width:185px; padding:3px; display:block">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" >
				<tr>
					<td width="185">
					<div class="navbar">	
						<div class="mainDiv">
							<div class="topItem"><p style="padding-top:4px"><?php echo $this->translate('System'); ?></p></div>
							<div class="dropMenu">
								<div class="subMenu" style="display:inline;">
									<div class="subItem"><a href="#"><?php echo $this->translate('User List'); ?></a></div>
									<div class="subItem"><a href="#"><?php echo $this->translate('Add User'); ?></a></div>
									<div class="subItem"><a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'generator', 'action' => 'models'), 'default', true); ?>"><?php echo $this->translate('Generator Models'); ?></a></div>
								</div>
							</div>
						</div>
						
						<div class="mainDiv">
							<div class="topItem"><p style="padding-top:4px"><?php echo $this->translate('System ACL'); ?></p></div>
							<div class="dropMenu">
								<div class="subMenu" style="display:inline;">
									<div class="subItem"><a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'acl', 'action' => 'module'), 'default', true);?>"><?php echo $this->translate('Module'); ?></a></div>
									<div class="subItem"><a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'acl', 'action' => 'resource'), 'default', true);?>"><?php echo $this->translate('Resource (controller)'); ?></a></div>
									<div class="subItem"><a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'acl', 'action' => 'privilege'), 'default', true); ?>"><?php echo $this->translate('Privilege (action)'); ?></a></div>
								</div>
							</div>
						</div>
						
						
					<script type="text/javascript">InitAll();</script>
					</div>
					</td>
				</tr>
				</table>
				</div>
			  <!--  end left menu -->	  		  
			  </td>
			  <td width="10">&nbsp;</td>
			  <td width="100%">
			  	<div id="main_content"><?php echo $this->layout()->content ?>&nbsp;</div>
			  </td>
		</tr>
	</table>
    </td>
  </tr>
  <tr>
    <td align="center" class="footer" height="25">
    &copy; <?php echo $this->translate('2011 All rights reserved.'); ?></td>
  </tr>
</table>
<script language="Javascript">	
<!--
    var show = Get_Cookie('showLeftCol');
    var obj=this.document.getElementById('leftMenu');
    if (show == 'true' && obj.style.display=='none') {
    	obj.style.display='block';
    	document['HideHandle'].src = '<?php echo $this->baseUrl()?>/images/admin/hide.gif';
    } else if(show=='false' && obj.style.display=='block') {
    	obj.style.display='none';
    	document['HideHandle'].src = '<?php echo $this->baseUrl()?>/images/admin/show.gif';			
    }
//-->
</script>
</body>
</html>	